Optimal. Leaf size=250 \[ -\frac{(a-b) \log \left (\cot (c+d x)-\sqrt{2} \sqrt{\cot (c+d x)}+1\right )}{2 \sqrt{2} d \left (a^2+b^2\right )}+\frac{(a-b) \log \left (\cot (c+d x)+\sqrt{2} \sqrt{\cot (c+d x)}+1\right )}{2 \sqrt{2} d \left (a^2+b^2\right )}+\frac{2 a^{5/2} \tan ^{-1}\left (\frac{\sqrt{a} \sqrt{\cot (c+d x)}}{\sqrt{b}}\right )}{b^{3/2} d \left (a^2+b^2\right )}-\frac{(a+b) \tan ^{-1}\left (1-\sqrt{2} \sqrt{\cot (c+d x)}\right )}{\sqrt{2} d \left (a^2+b^2\right )}+\frac{(a+b) \tan ^{-1}\left (\sqrt{2} \sqrt{\cot (c+d x)}+1\right )}{\sqrt{2} d \left (a^2+b^2\right )}+\frac{2}{b d \sqrt{\cot (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.49386, antiderivative size = 250, normalized size of antiderivative = 1., number of steps used = 16, number of rules used = 13, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.565, Rules used = {3673, 3569, 3653, 3534, 1168, 1162, 617, 204, 1165, 628, 3634, 63, 205} \[ -\frac{(a-b) \log \left (\cot (c+d x)-\sqrt{2} \sqrt{\cot (c+d x)}+1\right )}{2 \sqrt{2} d \left (a^2+b^2\right )}+\frac{(a-b) \log \left (\cot (c+d x)+\sqrt{2} \sqrt{\cot (c+d x)}+1\right )}{2 \sqrt{2} d \left (a^2+b^2\right )}+\frac{2 a^{5/2} \tan ^{-1}\left (\frac{\sqrt{a} \sqrt{\cot (c+d x)}}{\sqrt{b}}\right )}{b^{3/2} d \left (a^2+b^2\right )}-\frac{(a+b) \tan ^{-1}\left (1-\sqrt{2} \sqrt{\cot (c+d x)}\right )}{\sqrt{2} d \left (a^2+b^2\right )}+\frac{(a+b) \tan ^{-1}\left (\sqrt{2} \sqrt{\cot (c+d x)}+1\right )}{\sqrt{2} d \left (a^2+b^2\right )}+\frac{2}{b d \sqrt{\cot (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3673
Rule 3569
Rule 3653
Rule 3534
Rule 1168
Rule 1162
Rule 617
Rule 204
Rule 1165
Rule 628
Rule 3634
Rule 63
Rule 205
Rubi steps
\begin{align*} \int \frac{1}{\cot ^{\frac{5}{2}}(c+d x) (a+b \tan (c+d x))} \, dx &=\int \frac{1}{\cot ^{\frac{3}{2}}(c+d x) (b+a \cot (c+d x))} \, dx\\ &=\frac{2}{b d \sqrt{\cot (c+d x)}}+\frac{2 \int \frac{-\frac{a}{2}-\frac{1}{2} b \cot (c+d x)-\frac{1}{2} a \cot ^2(c+d x)}{\sqrt{\cot (c+d x)} (b+a \cot (c+d x))} \, dx}{b}\\ &=\frac{2}{b d \sqrt{\cot (c+d x)}}+\frac{2 \int \frac{-\frac{a b}{2}-\frac{1}{2} b^2 \cot (c+d x)}{\sqrt{\cot (c+d x)}} \, dx}{b \left (a^2+b^2\right )}-\frac{a^3 \int \frac{1+\cot ^2(c+d x)}{\sqrt{\cot (c+d x)} (b+a \cot (c+d x))} \, dx}{b \left (a^2+b^2\right )}\\ &=\frac{2}{b d \sqrt{\cot (c+d x)}}+\frac{4 \operatorname{Subst}\left (\int \frac{\frac{a b}{2}+\frac{b^2 x^2}{2}}{1+x^4} \, dx,x,\sqrt{\cot (c+d x)}\right )}{b \left (a^2+b^2\right ) d}-\frac{a^3 \operatorname{Subst}\left (\int \frac{1}{\sqrt{-x} (b-a x)} \, dx,x,-\cot (c+d x)\right )}{b \left (a^2+b^2\right ) d}\\ &=\frac{2}{b d \sqrt{\cot (c+d x)}}+\frac{(a-b) \operatorname{Subst}\left (\int \frac{1-x^2}{1+x^4} \, dx,x,\sqrt{\cot (c+d x)}\right )}{\left (a^2+b^2\right ) d}+\frac{\left (2 a^3\right ) \operatorname{Subst}\left (\int \frac{1}{b+a x^2} \, dx,x,\sqrt{\cot (c+d x)}\right )}{b \left (a^2+b^2\right ) d}+\frac{(a+b) \operatorname{Subst}\left (\int \frac{1+x^2}{1+x^4} \, dx,x,\sqrt{\cot (c+d x)}\right )}{\left (a^2+b^2\right ) d}\\ &=\frac{2 a^{5/2} \tan ^{-1}\left (\frac{\sqrt{a} \sqrt{\cot (c+d x)}}{\sqrt{b}}\right )}{b^{3/2} \left (a^2+b^2\right ) d}+\frac{2}{b d \sqrt{\cot (c+d x)}}-\frac{(a-b) \operatorname{Subst}\left (\int \frac{\sqrt{2}+2 x}{-1-\sqrt{2} x-x^2} \, dx,x,\sqrt{\cot (c+d x)}\right )}{2 \sqrt{2} \left (a^2+b^2\right ) d}-\frac{(a-b) \operatorname{Subst}\left (\int \frac{\sqrt{2}-2 x}{-1+\sqrt{2} x-x^2} \, dx,x,\sqrt{\cot (c+d x)}\right )}{2 \sqrt{2} \left (a^2+b^2\right ) d}+\frac{(a+b) \operatorname{Subst}\left (\int \frac{1}{1-\sqrt{2} x+x^2} \, dx,x,\sqrt{\cot (c+d x)}\right )}{2 \left (a^2+b^2\right ) d}+\frac{(a+b) \operatorname{Subst}\left (\int \frac{1}{1+\sqrt{2} x+x^2} \, dx,x,\sqrt{\cot (c+d x)}\right )}{2 \left (a^2+b^2\right ) d}\\ &=\frac{2 a^{5/2} \tan ^{-1}\left (\frac{\sqrt{a} \sqrt{\cot (c+d x)}}{\sqrt{b}}\right )}{b^{3/2} \left (a^2+b^2\right ) d}+\frac{2}{b d \sqrt{\cot (c+d x)}}-\frac{(a-b) \log \left (1-\sqrt{2} \sqrt{\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt{2} \left (a^2+b^2\right ) d}+\frac{(a-b) \log \left (1+\sqrt{2} \sqrt{\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt{2} \left (a^2+b^2\right ) d}+\frac{(a+b) \operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,1-\sqrt{2} \sqrt{\cot (c+d x)}\right )}{\sqrt{2} \left (a^2+b^2\right ) d}-\frac{(a+b) \operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,1+\sqrt{2} \sqrt{\cot (c+d x)}\right )}{\sqrt{2} \left (a^2+b^2\right ) d}\\ &=-\frac{(a+b) \tan ^{-1}\left (1-\sqrt{2} \sqrt{\cot (c+d x)}\right )}{\sqrt{2} \left (a^2+b^2\right ) d}+\frac{(a+b) \tan ^{-1}\left (1+\sqrt{2} \sqrt{\cot (c+d x)}\right )}{\sqrt{2} \left (a^2+b^2\right ) d}+\frac{2 a^{5/2} \tan ^{-1}\left (\frac{\sqrt{a} \sqrt{\cot (c+d x)}}{\sqrt{b}}\right )}{b^{3/2} \left (a^2+b^2\right ) d}+\frac{2}{b d \sqrt{\cot (c+d x)}}-\frac{(a-b) \log \left (1-\sqrt{2} \sqrt{\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt{2} \left (a^2+b^2\right ) d}+\frac{(a-b) \log \left (1+\sqrt{2} \sqrt{\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt{2} \left (a^2+b^2\right ) d}\\ \end{align*}
Mathematica [C] time = 0.370386, size = 193, normalized size = 0.77 \[ \frac{8 a^2 \, _2F_1\left (-\frac{1}{2},1;\frac{1}{2};-\frac{a \cot (c+d x)}{b}\right )+b \left (\sqrt{2} a \sqrt{\cot (c+d x)} \left (-\log \left (\cot (c+d x)-\sqrt{2} \sqrt{\cot (c+d x)}+1\right )+\log \left (\cot (c+d x)+\sqrt{2} \sqrt{\cot (c+d x)}+1\right )-2 \tan ^{-1}\left (1-\sqrt{2} \sqrt{\cot (c+d x)}\right )+2 \tan ^{-1}\left (\sqrt{2} \sqrt{\cot (c+d x)}+1\right )\right )+8 b \, _2F_1\left (-\frac{1}{4},1;\frac{3}{4};-\cot ^2(c+d x)\right )\right )}{4 b d \left (a^2+b^2\right ) \sqrt{\cot (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.275, size = 5528, normalized size = 22.1 \begin{align*} \text{output too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{{\left (b \tan \left (d x + c\right ) + a\right )} \cot \left (d x + c\right )^{\frac{5}{2}}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]